package com.techstar.ats.dxp.live.rep;

import java.time.LocalDateTime;
import java.util.LinkedList;
import java.util.List;

import com.techstar.ats.dxp.AtsMessage;
import com.techstar.ats.dxp.AtsResponse;
import com.techstar.ats.dxp.live.F07Depot;

public class F07DepotPlan extends AtsMessage implements AtsResponse {
	private static final long serialVersionUID = 1L;
	public final List<F07Depot> depots = new LinkedList<>();
	public LocalDateTime datetime;

	public boolean toCsvString(StringBuffer sb) {
		this.depots.forEach((x) -> {
			sb.append(this.line)
				.append(',')
				.append(this.datetime.format(DATE_TIME_FORMATTER))
				.append(',');
			x.toCsvString(sb);
			sb.append(System.lineSeparator());
		});
		return false;
	}
}
